home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 21 / CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso / CUCD / Programming / Python-1.4 / Source / Amiga / Python_netlib / seteuid.c < prev    next >
C/C++ Source or Header  |  1996-04-22  |  490b  |  27 lines

  1. RCS_ID_C="$Id: seteuid.c,v 4.1 1994/09/29 23:09:02 jraja Exp $";
  2. /*
  3.  *      seteuid() - set effective user
  4.  *
  5.  *      Copyright © 1994 AmiTCP/IP Group, 
  6.  *                       Network Solutions Development Inc.
  7.  *                       All rights reserved.
  8.  */
  9.  
  10. #include <sys/types.h>
  11. #include <unistd.h>
  12.  
  13. #include <proto/usergroup.h>
  14. #include "allobjects.h"
  15.  
  16. #ifdef seteuid
  17. #undef seteuid
  18. #endif
  19.  
  20. int
  21. seteuid(uid_t u)
  22. {
  23.   if(!checkusergrouplib()) return -1;
  24.   return setreuid(-1, u);
  25. }
  26.  
  27.